package com.platform.qujia.service.impl;


import com.platform.qujia.dao.ReductionOilRelationsMapper;
import com.platform.qujia.pojo.ReductionOilRelations;
import com.platform.qujia.service.ReductionOilRelationsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 立减活动和油品关系Service业务层处理
 * 
 * @author qujia
 * @date 2021-11-02
 */
@Service("reductionOilRelationsService")
public class ReductionOilRelationsServiceImpl implements ReductionOilRelationsService
{
    @Resource
    private ReductionOilRelationsMapper reductionOilRelationsMapper;

    /**
     * 查询立减活动和油品关系
     * 
     * @param activityOilId 立减活动和油品关系ID
     * @return 立减活动和油品关系
     */
    @Override
    public ReductionOilRelations selectReductionOilRelationsById(Long activityOilId)
    {
        return reductionOilRelationsMapper.selectReductionOilRelationsById(activityOilId);
    }

    /**
     * 查询立减活动和油品关系列表
     * 
     * @param reductionOilRelations 立减活动和油品关系
     * @return 立减活动和油品关系
     */
    @Override
    public List<ReductionOilRelations> selectReductionOilRelationsList(ReductionOilRelations reductionOilRelations)
    {
        return reductionOilRelationsMapper.selectReductionOilRelationsList(reductionOilRelations);
    }

    /**
     * 新增立减活动和油品关系
     * 
     * @param reductionOilRelations 立减活动和油品关系
     * @return 结果
     */
    @Override
    public int insertReductionOilRelations(ReductionOilRelations reductionOilRelations)
    {
        return reductionOilRelationsMapper.insertReductionOilRelations(reductionOilRelations);
    }

    /**
     * 修改立减活动和油品关系
     * 
     * @param reductionOilRelations 立减活动和油品关系
     * @return 结果
     */
    @Override
    public int updateReductionOilRelations(ReductionOilRelations reductionOilRelations)
    {
        return reductionOilRelationsMapper.updateReductionOilRelations(reductionOilRelations);
    }

    /**
     * 批量删除立减活动和油品关系
     * 
     * @param activityOilIds 需要删除的立减活动和油品关系ID
     * @return 结果
     */
    @Override
    public int deleteReductionOilRelationsByIds(Long[] activityOilIds)
    {
        return reductionOilRelationsMapper.deleteReductionOilRelationsByIds(activityOilIds);
    }

    /**
     * 删除立减活动和油品关系信息
     * 
     * @param activityOilId 立减活动和油品关系ID
     * @return 结果
     */
    @Override
    public int deleteReductionOilRelationsById(Long activityOilId)
    {
        return reductionOilRelationsMapper.deleteReductionOilRelationsById(activityOilId);
    }
}
